// 统一管理 Home 里面的 api
import request from '../utils/request'
// get - params
// post put - data
export const homeIndex = (params) => {
  return request({
    url: 'home/index',
    params
  })
}
// 品牌商直供
export const brandList = (params) => {
  return request({
    url: 'brand/list',
    params,
    page: 1,
    limit: 10
  })
}
// 新品首发 人气推荐
// http://82.157.146.153:8090/wx/goods/list?categoryId=1008002&page=1&limit=10
export const goodsList = (params) => {
  return request({
    url: 'goods/list',
    params,
    isNew: true,
    id: 1005000,
    page: 1,
    limit: 10
  })
}
// 新品首发 人气推荐 topic/list?page=1&limit=10
export const topicList = (params) => {
  return request({
    url: 'topic/list',
    params,
    page: 1,
    limit: 10
  })
}
export const login = (data) => {
  return request.post({
    url: 'auth/login',
    data
  })
}
// 收藏
export const collect = (data) => {
  return request.post({
    url: '/collect/addordelete',
    method: 'POST',
    data
  })
}
